@page
@{ Layout = "_LayoutApp"; }

@section Styles{
    <style>
        html {
            overflow: hidden;
        }
        .el-input__inner
        {
            border-radius:0 !important;
        }
    </style>
}

<div>
    <div class="py-5 text-center animate__animated animate__fadeInDown">
        <div class="py-3">
            <img :src="DEFAULT_LOGO_URL" height="66" />
        </div>
    </div>
    <el-card class="box-card rounded-0 mx-3">
        <div class="h1 fw-bold mb-3">
            登录
        </div>
        <el-alert class="rounded-0 fs-6" v-if="pageAlert" style="margin-bottom: 10px;" :closable="false" :type="pageAlert.type" v-html="pageAlert.title"></el-alert>
        <el-form size="medium" v-on:submit.native.prevent ref="formAccount" :model="form" label-width="0" status-icon>
            <el-form-item prop="account" :rules="[{ required: true, message: '请输入用户名/手机号/邮箱' }]">
                <el-input ref="account" v-model="form.account" placeholder="请输入用户名/手机号/邮箱" autocomplete="off" v-on:keyup.enter.native="btnSubmitClick">
                </el-input>
            </el-form-item>
            <el-form-item prop="password" :rules="[{ required: true, message: '请输入密码' }]">
                <el-input v-model="form.password" type="password" name="password" placeholder="请输入密码" autocomplete="off" v-on:keyup.enter.native="btnSubmitClick">
                </el-input>
            </el-form-item>
            <el-form-item v-if="!isUserCaptchaDisabled" prop="captchaValue" :rules="[{ required: true, message: '请输入验证码' }]">
                <el-input v-model="form.captchaValue" placeholder="请输入验证码" autocomplete="off" v-on:keyup.enter.native="btnSubmitClick">
                    <template slot="append">
                        <a href="javascript:;" v-on:click="btnCaptchaClick">
                            <img v-show="captchaUrl" style="display: none; height: 30px;" :src="captchaUrl">
                        </a>
                    </template>
                </el-input>
            </el-form-item>
        </el-form>
        <button type="button" v-on:click="btnSubmitClick" class="btn btn-primary rounded-0 w-100">登 录<i class="bi bi-box-arrow-in-right ms-3"></i></button>
    </el-card>
    <div class="mt-5 text-center animate__animated animate__fadeInUpBig fs-5">{{ DOCUMENTTITLE }}<span class="ms-2 text-warning">v{{ version }}</span></div>
</div>

@section Scripts{
    <script src="/sitefiles/assets/lib/md5-2.10.0.min.js" type="text/javascript"></script>
    <script src="/sitefiles/assets/js/app/login.js" type="text/javascript"></script>
}